<?php
/**
 * 模板消息添加.
 * User: lvshuyun
 * Date: 2015/6/11
 * Time: 10:18
 */

use common\widgets\ActiveForm;
use common\widgets\FormTable;
use kartik\widgets\DateTimePicker;

$this->title = '微信推送消息';

$form = ActiveForm::begin();
echo FormTable::widget([
    'model'=>$model,
    'form'=>$form,
    'cols' => 2,
    'rows' => [
        [
            'title' => ['type'=>FormTable::INPUT_TEXT, 'width'=>6],

        ],
        [
            'desc' => ['type'=>FormTable::INPUT_TEXTAREA, 'width'=>6],
        ],
        [
            'remark' => ['type'=>FormTable::INPUT_TEXTAREA, 'width'=>6],
        ],
        [
            'url' => ['type'=>FormTable::INPUT_TEXT, 'width'=>6],
        ],
        [
            'money'=>[
                'type'=>FormTable::INPUT_TEXT,
                'options'=>['placeholder'=>'金额...']
            ],
            'time'=>[
                'type'=>FormTable::INPUT_DROPDOWN_LIST,
                'items'=>[0=>'--请选择时间--', 1=>'早', 2=>'中', 3=>'晚']
            ],
        ],
        [
            'startTime'=>[
                'type' => FormTable::INPUT_WIDGET,
                'widgetClass' => 'kartik\widgets\DateTimePicker',
                'options' => [
                    'pluginOptions' => [
                        'readonly' => true,
                        'type' => DateTimePicker::TYPE_INPUT,
                        'pluginOptions'=>[
                            'displayFormat' => 'yyyy-mm-dd hh:ii',
                            'autoclose' => false
                        ]
                    ]
                ],
            ],
            'endTime'=>[
                'type' => FormTable::INPUT_WIDGET,
                'widgetClass' => 'kartik\widgets\DateTimePicker',
                'options' => [
                    'pluginOptions' => [
                        'readonly' => true,
                        'type' => DateTimePicker::TYPE_INPUT,
                        'pluginOptions'=>[
                            'displayFormat' => 'yyyy-mm-dd hh:ii',
                            'autoclose' => false
                        ]
                    ]
                ],
            ],
        ]
    ],
]);

ActiveForm::end();
